const http = uni.$u.http

/**
 * 微信登录
 */
export const wxLoginApi = (code) => http.get('/Vip/login?code=' + code)

/**
 * 自定义添加公司
 */
export const addcustomCompany = (data) => http.post(`/Vip/addcustomCompany`, data)
/**
 * 获取用户信息
 * */
export const getUserInfoApi = () => http.get('/Vip/getInfo')
/**
 * 绑定码绑定公司
 * */
export const bindingApi = (bindingCode) => http.post(`/Vip/binding/${bindingCode}`)
/**
 * 查询公司
 * */
export const getCompanyApi = (companyName) => http.get('/Vip/getCompanyList?companyName=' + companyName)
/**
 *  解绑公司
 * */
export const deleteCompanyApi = (companyId) => http.delete(`/Vip/unBinding/${companyId}`)
export const getContractApi = (companyId) => http.get(`/CustomerContract/byCompanyId/${companyId}`)
export const addEmployee = (data) => http.post('/VipEmployee', data)
/**
 * 添加员工五险一金
 */
export const addEmployeeWithInsurance = (data) => http.post('/VipEmployee/withInsurance', data)
/**
 * 查看员工详情
 */
export const getEmployeeByIdApi = (companyId) => http.get(`/VipEmployee/${companyId}`)
/**
 * 根据公司ID获取员工列表
 */
export const getEmployeeListApi = (data) => http.get(`/VipEmployee/list?` + data)
export const changeCurrentCompanyApi = (companyId) => http.put(`/Vip/changeCurrentCompany/${companyId}`)


//获取历史开票记录
export const getinvoicesApi = () => {
	return http.get('/invoices')
}
//获取草稿记录
export const getdraftsApi = () => {
	return http.get('/drafts')
}
//添加草稿
export const adddraftsApi = (data) => {
	return http.post('/drafts', data)
}
//获取商品列表
export const getshopApi = () => {
	return http.post('/findshopbyuserid')
}
//添加商品列表
export const addshopApi = (data) => {
	return http.post('/addshop', data)
}
//删除商品
export const delshopApi = (data) => {
	return http.post('/deletebyid', data)
}
//更新商品
export const updateshopApi = (data) => {
	return http.post('/updatebyid', data)
}
//添加发票
export const addinvoiceApi = (data) => {
	return http.post('/parse', data)
}
export const delinvoiceApi = (data) => {
	return http.delete('/invoice/remove', data)
}
//获取用户信息
export const getuserinfoApi = (data) => {
	return http.post('/getuserinfo', data)
}
//修改用户购方信息
export const editbankinfoApi = (data) => {
	return http.post('/editbankinfo', data)
}

//获取等待开票
export const fastbillinggetApi = (data) => {
	return http.post('/fastbillingget', data)
}

export const getcustomApi = () => {
	return http.get('/customs')
}

export const delcustomApi = (data) => {
	return http.delete('/custom/remove', data)
}

export const deldraftApi = (data) => {
	return http.delete('/draft/remove', data)
}

export const addcustomApi = (data) => {
	return http.post('/customs/add', data)
}

export const downloadallexelApi = (data) => {
	return http.post('/invoice/downexel', data)
}